﻿/************************************************************************
 * AIDE - Automata Identification Engine
 * Copyright (C) 2012-2013 Ali Khalili (khalili_DOT_ir_@SIGN_gmail_DOT_com)
 * **********************************************************************
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License (LGPL) published 
 * by the Free Software Foundation; either version 2.1 of the License, or (at your
 * option) any later version. This program is distributed without any
 * warranty. See the GNU Lesser General Public License for more details. 
 * ***********************************************************************
 * File         :     AIDE\Oracles\NFMs\IOracle_MAT_MM.cs
 * Description  :     Provides a general interface for oracles aiming (deterministic) Mealy machines 
 *                    for (Minimally Adequate Teacher) MAT setting
 * Change log   :     -6 Feb 2013:  First version
 * To Do        :
 ************************************************************************/
using System;
using SMLib.Automata.Base;
using SMLib.Automata.MM;

/// <summary>
/// Oracles for learning mealy machines
/// </summary>
namespace AIDE.Oracles.NFMs
{
    /// <summary>
    /// Interface for an oracle of a (deterministic) Mealy machine in MAT setting
    /// </summary>
    public interface IOracle_MAT_MM
    {
        /// <summary>
        /// Membership Query: What is the output for a given input sequence
        /// </summary>
        /// <param name="subwords">set of input subwords</param>
        /// <returns>the generated word</returns>
        Word OutputTrace(params Word[] subwords);

        /// <summary>
        /// Equivalence Query: find the counterexample for a given conjecture
        /// </summary>
        /// <param name="conjucture">the conjecture to be compared with</param>
        /// <returns>null if the conjecture was equal to SUL, a distinguishing counterexample if not</returns>
        Word EquivalenceQ(MealyMachine conjucture);

        /// <summary>
        /// Input Alphabet of the Mealy machine
        /// </summary>
        Alphabet InputAlphabet
        {
            get;
        }
		
		/// <summary>
		/// Sets the logger.
		/// </summary>
		/// <param name='logHelper'>
		/// Log helper.
		/// </param>
		void SetLogger(IOracleLogHelper logHelper);
    }
}
